import styled from "styled-components";
import {DarkFontColor, DeepBackgroundColor, LightBackgroundColor, LightFontColor} from "@/style/Color";

export const HomeWrapperBackground = styled.div`
  z-index: 1;
  overflow: hidden;
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  height: auto;
`

export const HomeBaseWrapper = styled.div`
  z-index: 1;
  overflow: hidden;
  width: 100%;
  min-width: 1230px;
  margin: 0 auto;
  min-height: 800px;
  //background-color: #FFFFFF;
  //background: rgb(255,255,255,0.5);
`
export const HomeWrapper = styled.div`
  z-index: 1;
  overflow: hidden;
  width: 1440px;
  min-width: 960px;
  margin: 0 auto;
  min-height: 800px;
  height: auto;
  #document {
    color: ${LightFontColor};

    h1, h2, h3, h4, h5, h6 {
      color: ${LightFontColor};
    }
  }
`

export const HomeLeftContainer = styled.div`
  overflow: hidden;
  width: 78%;
  padding: 20px;
  float: left;
  border-radius: 20px;
`


export const HomeRightContainer = styled.div`
  margin-left: 20px;
  padding: 20px 15px;
  width: 20%;
  min-width: 250px;
  height: 800px;
  float: right;
  background-color: ${DeepBackgroundColor};
`
export const SearchBox = styled.input.attrs({
    placeholder: '搜一搜关键字'
})`
  &.slide-enter {
    transition: all 0.3s ease-out;
  }

  &.slide-enter-active {
    width: 400px;
  }

  &.slide-exit {
    transition: all 0.3s ease-out;
  }

  &.slide-exit-active {
    width: 320px;
  }

  width: 500px;
  height: 50px;
  border: none;
  outline: none;
  border-radius: 25px;
  transition: all .3s ease-in-out;
  background: rgb(255, 255, 255, 0.8);
  /*此padding-right为鼠标未聚焦状态下的尺寸*/
  padding: 0 50px 0 25px;
  box-sizing: border-box;
  font-size: 14px;
  color: #555555;

  ::placeholder {
    color: #6a6a6a;
  }

  &.search-focus {
    width: 400px;

  }
`
export const BannerContainer = styled.div`
  width: auto;
  height: 380px;
  border-radius: 20px;
  float: left;
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  background-image: url(${props => props.bannerUrl ? props.bannerUrl : ''});
`
export const HomeContainer = styled.div`
  width: 100%;
  height: auto;
  float: left;
  //background-color: ${LightBackgroundColor};
  padding: 50px 0;
`
export const CoverBox = styled.div`
  width: 100%;
  height: 450px;
  min-width: 960px;
  margin: 0 0 30px 0;
  float: left;
`
export const SearchBoxWrapper = styled.div`
  /* 使按钮无法被选中：↓ */
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  /* 使按钮无法被选中：↑ */

  .zoom {
    position: absolute;
    margin-left: -40px;
    line-height: 50px;
    font-size: 25px;
    z-index: 999;
    cursor:pointer;
    transition: .2s ease-in-out;
    &.search-focus {
      background-color: #777;
      color: #fff;
    }
  }
`
export const BackGroundVideo = styled.video`
  width: 100%;
  position: absolute;
  //object-fit: fill;
  top: 0;
  left: 0;
  min-width: 960px;
  min-height: 100%;
  height: auto;
  //z-index: 0;
  /*灰色调*/
  //-webkit-filter:grayscale(100%)
`
export const HomeBannerContainer = styled.div`
  width: 960px;
  height: 580px;
  float: left;
  margin: 0 auto;
`

/**
 * 传参bgImage = backgroundImageUrl
 */
export const HomeBannerItem = styled.div`
  width: calc(100% - 20px);
  height: 580px;
  float: left;
  text-align: center;
  position: relative;
  user-select: none;
`
export const BannerOutside = styled.div`
  width: 100%; /*宽度铺满屏幕*/
  transform: scale(1.1);
  height: 580px;
  filter: blur(15px); /*虚化值，越大越模糊*/
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  background-image: url(${props => props.bgImage ? props.bgImage : ''});
`
export const HomeBannerDescription = styled.div`
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 80px;
  opacity: 0.6;
  color: white;
  text-align: center;
  padding: 5px 20px;
  text-indent: 2em;
  font-size: 13px;
  z-index: 11;
  background-color: #363636;
`

export const Description = styled.span``


export const LeftButton = styled.div`
  position: absolute;
  z-index: 2;
  width: 40px;
  height: 40px;
  opacity: 0.5;
  margin-top: 230px;
  left: 10px;

  :hover {
    opacity: 0.8;
    cursor: pointer;
  }
`

export const RightButton = styled.div`
  position: absolute;
  z-index: 2;
  width: 40px;
  height: 40px;
  opacity: 0.5;
  margin-top: 230px;
  right: 30px;

  :hover {
    opacity: 0.8;
    cursor: pointer;
  }
`

export const ViewMoreContainer = styled.div`
  width: 100%;
  height: 20px;
  float: left;
  padding: 0 10px;
  margin-bottom: 10px;

  label {
    line-height: 18px;
    color: #999999;
    font-size: 10px;

    &.right {
      float: right;
      cursor: pointer;
    }

    &.left {
      float: left;
      user-select: none;
      color: #c1c1c1;
    }
  }

`
export const ViewMoreBtn = styled.div`
  width: 20px;
  height: 20px;
  float: right;
  cursor: pointer;
`
